package com.heima.article.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.heima.model.article.datos.ArticelDto;
import com.heima.model.article.datos.ArticleHomeDto;
import com.heima.model.article.datos.ArticleInfoDto;
import com.heima.model.article.pojos.ApArticle;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.mess.ArticleVisitStreamMess;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ApArticleService extends IService<ApArticle> {

    ResponseResult saveApArtice(ArticelDto articelDto);

    ResponseResult loadArticleList( ArticleHomeDto dto, Short type);

    /**
     * 查询文章详情
     * @param dto
     * @return
     */
    ResponseResult loadArticleInfo(ArticleInfoDto dto);

    /**
     * 回显文章行为
     * @param dto
     * @return
     */
    ResponseResult loadArticleBehavior(ArticleInfoDto dto);

    /**
     * 重新计算文章分值
     * @param mess
     */
     void updateApArticle(ArticleVisitStreamMess mess);


    /**
     * 根据参数加载文章列表  v2
     * @param loadtype
     * @param dto
     * @param firstPage
     * @return
     */
     ResponseResult load2(Short loadtype, ArticleHomeDto dto,boolean firstPage);
}